package legumes.client.evt.main;

import legumes.shared.domain.PlaceDelivery;
import legumes.shared.domain.Store;

import com.google.gwt.event.shared.GwtEvent;

public class PlaceDeliverySelectionOverviewEvent extends GwtEvent<PlaceDeliverySelectionOverviewEventHandler> {

	public static Type<PlaceDeliverySelectionOverviewEventHandler> TYPE = new Type<PlaceDeliverySelectionOverviewEventHandler>();
	
	private Store store;
	private PlaceDelivery pl;
	
	public PlaceDeliverySelectionOverviewEvent(Store store_, PlaceDelivery pl_) {
		store = store_;
		pl = pl_;
	}
	
	@Override
	public com.google.gwt.event.shared.GwtEvent.Type<PlaceDeliverySelectionOverviewEventHandler> getAssociatedType() {
		return TYPE;
	}

	@Override
	protected void dispatch(PlaceDeliverySelectionOverviewEventHandler handler) {
		handler.onStoreSelectionChanged(this);
	}

	public Store getStore() {
		return store;
	}

	public PlaceDelivery getPlaceDelivery(){
		return pl;
	}

}
